package com.ruoyi.production.service.impl.graftinglabel;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.production.mapper.graftinglabel.GraftinglabelAmountMapper;
import com.ruoyi.production.domain.graftinglabel.GraftinglabelAmount;
import com.ruoyi.production.service.graftinglabel.IGraftinglabelAmountService;

/**
 * 嫁接签量Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-12
 */
@Service
public class GraftinglabelAmountServiceImpl implements IGraftinglabelAmountService
{
    @Autowired
    private GraftinglabelAmountMapper graftinglabelAmountMapper;

    /**
     * 查询嫁接签量
     *
     * @param graftinglabelAmountId 嫁接签量ID
     * @return 嫁接签量
     */
    @Override
    public GraftinglabelAmount selectGraftinglabelAmountById(Long graftinglabelAmountId)
    {
        return graftinglabelAmountMapper.selectGraftinglabelAmountById(graftinglabelAmountId);
    }

    /**
     * 查询嫁接签量列表
     *
     * @param graftinglabelAmount 嫁接签量
     * @return 嫁接签量
     */
    @Override
    public List<GraftinglabelAmount> selectGraftinglabelAmountList(GraftinglabelAmount graftinglabelAmount)
    {
        return graftinglabelAmountMapper.selectGraftinglabelAmountList(graftinglabelAmount);
    }

    /**
     * 新增嫁接签量
     *
     * @param graftinglabelAmount 嫁接签量
     * @return 结果
     */
    @Override
    public int insertGraftinglabelAmount(GraftinglabelAmount graftinglabelAmount)
    {
        graftinglabelAmount.setCreateTime(DateUtils.getNowDate());
        return graftinglabelAmountMapper.insertGraftinglabelAmount(graftinglabelAmount);
    }

    /**
     * 修改嫁接签量
     *
     * @param graftinglabelAmount 嫁接签量
     * @return 结果
     */
    @Override
    public int updateGraftinglabelAmount(GraftinglabelAmount graftinglabelAmount)
    {
        graftinglabelAmount.setUpdateTime(DateUtils.getNowDate());
        return graftinglabelAmountMapper.updateGraftinglabelAmount(graftinglabelAmount);
    }

    /**
     * 批量删除嫁接签量
     *
     * @param graftinglabelAmountIds 需要删除的嫁接签量ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelAmountByIds(Long[] graftinglabelAmountIds)
    {
        return graftinglabelAmountMapper.deleteGraftinglabelAmountByIds(graftinglabelAmountIds);
    }

    /**
     * 删除嫁接签量信息
     *
     * @param graftinglabelAmountId 嫁接签量ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelAmountById(Long graftinglabelAmountId)
    {
        return graftinglabelAmountMapper.deleteGraftinglabelAmountById(graftinglabelAmountId);
    }
}
